package com.lidong.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lidong.entity.Dept;
import com.lidong.mapper.DeptMapper;
import com.lidong.service.IDeptService;

/**
 * @Description : 
 * @Author : lidong
 * @Date : 2017年11月1日
 */
@Service
@Transactional
public class DeptServiceImpl implements IDeptService {

	@Resource
	private DeptMapper deptMapper;
	
	@Override
	public Boolean add(Dept dept) {
		return deptMapper.createDept(dept);
	}

	@Override
	public Dept get(long deptNo) {
		return deptMapper.findDeptById(deptNo);
	}

	@Override
	public List<Dept> list() {
		return deptMapper.findAll();
	}

	@Override
	public Boolean modify(Dept newDept) {
		return deptMapper.update(newDept);
	}
	
}
